//
//  SPCollectionViewCell.m
//  Sport
//
//  Created by Cass on 2018/3/10.
//  Copyright © 2018年 Cass. All rights reserved.
//

#define MarginTop 12
#define MarginLeft 17
#define PictureViewWH ((SCREEN_WIDTH - 2 * MarginTop -3 * MarginLeft ) / 4)

#import "SPCollectionViewCell.h"

@implementation SPCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self addSubview:self.imageV];
    }
    return self;
}
- (UIImageView *)imageV{
    if (!_imageV) {
        self.imageV = [[UIImageView alloc]initWithFrame:self.bounds];
        _imageV.userInteractionEnabled = YES;
    }
    return _imageV;
}
- (UIButton *)deleteBtn{
    if (!_deleteBtn) {
        self.deleteBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _deleteBtn.frame = CGRectMake(PictureViewWH - 20, 0, 20, 20);
        [_deleteBtn setBackgroundImage:[UIImage imageNamed:@"icon_shanchu_2"] forState:UIControlStateNormal];
    }
    return _deleteBtn;
}
@end
